package com.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyController {

	@RequestMapping("/hello")
	public String hello(){
		return "hello";
	}

	/**
	 *
	 * 正确连接：http://localhost:8088/paramAndHeader?username=chen&age=2
	 * 错误连接：http://localhost:8088/paramAndHeader?username=chen&age=10
	 * @return
	 */
	@RequestMapping(value = "/paramAndHeader",
			params = {"username","age!=10"}
			,headers = {"Accept-Language=zh-CN,zh;q=0.9,zh-TW;q=0.8"})
	public String hh(){
		return "hello";
	}
	@RequestMapping(value = "/paramAndHeader2",
			params = {"username","age!=10"}
			,headers = {"Accept-Language=en-US,zh;q=0.9,zh-TW;q=0.8"})
	public String hh1(){
		return "hello";
	}

}
